home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0498.dms / q0498.adf / FGEN-BOOT < prev    next >
Text File  |  1992-06-07  |  5KB  |  225 lines

  1. curdsk=1
  2. colour=1
  3. yyval=12
  4. skipdel=0
  5.  
  6. cpytitl:dc.b "Lockpick Fast Copier Request",0
  7. cpyques:dc.b "Do you need a copy of the original?",0
  8. copyrst:dc.b "Proceeding with Fast Copy of remaining disks...",0
  9.  
  10. frqtitl:dc.b "Move to destination path... ",0
  11. frqpath:ds.b 256,0
  12. frqname:ds.b 32,0
  13.  
  14. nxtdskm:dc.b "Copy disk "
  15. dskm1:    dc.b "00 of "
  16. dskm2:    dc.b "00?",0
  17.  
  18. docopy=simplereq(cpytitl,cpyques)
  19. cmp docopy,0,2,goto docnct
  20. drivenum=0
  21. poke(drname+2,48)
  22. poke(remdsk+19,48)
  23. poke(insdsk2+6,48)
  24. goto start
  25.  
  26. docnct:connect=drives()
  27. cmp connect,-1,0,goto byebye
  28. poke(drname+2,connect+48)
  29. poke(remdsk+19,connect+48)
  30. poke(insdsk2+6,connect+48)
  31.  
  32. drivenum=fcopy(connect,0)
  33. cmp drivenum,0,-1,goto byebye
  34. goto start
  35.  
  36.  
  37. fnf:    dc.b "File not found!  Attempting Disk Scan...",0
  38. fnf1:    dc.b "File not found!",0
  39. pnf:    dc.b "Protection not found! Attempting Disk Scan!",0
  40. pnf1:    dc.b "Protection not found!",0
  41. pnf2:    dc.b "*** PARAMETER FAILED! ***",0
  42. worktxt:dc.b "Working, please stand by...",0
  43. clickany:dc.b "Click in this window to exit...",0
  44.  
  45. prof:    dc.b "*** Parameter Successful! ***",0
  46. remdsk:    dc.b "Remove disk from DF0: then click in this window...",0
  47.  
  48. insdsk:    dc.b "Insert BACKUP of",0
  49. insdsk2:dc.b " in DF0: then click in this window...",0
  50.  
  51.     dc.w 0
  52. oritab:    dc.l orig1,fix1,orig2,fix2,orig3,fix3,orig4,fix4,orig5,fix5
  53.     dc.l orig6,fix6,orig7,fix7,orig8,fix8,orig9,fix9
  54.     dc.l orig10,fix10,orig11,fix11,orig12,fix12,orig13,fix13
  55.     dc.l orig14,fix14,orig15,fix15,orig16,fix16,orig17,fix17
  56.     dc.l orig18,fix18,orig19,fix19,orig20,fix20,orig21,fix21
  57.     dc.l orig22,fix22,orig23,fix23,orig24,fix24,orig25,fix25
  58.     dc.l orig26,fix26,orig27,fix27,orig28,fix28,orig29,fix29
  59.     dc.l orig30,fix30,orig31,fix31,orig32,fix32,orig33,fix33
  60.     dc.l orig34,fix34,orig35,fix35,orig36,fix36,orig37,fix37
  61.     dc.l orig38,fix38,orig39,fix39,orig40,fix40,orig41,fix41
  62.     dc.l orig42,fix42,orig43,fix43,orig44,fix44,orig45,fix45
  63.     dc.l 0,0
  64.  
  65. * Open Window and print intro text...
  66. start:    cmp ^winname,"con:",0,winname=winname+18
  67.     pokel(wtitle,winname)
  68.     gosub openwin
  69.  
  70.     cmp docopy,1,0,goto main
  71.     cmp freturn,-1,0,goto main
  72.  
  73.     gosub remm
  74.     txtptr=insdsk
  75.     gosub print3d
  76.     txtptr=dname
  77.     colour=3
  78.     gosub print3d
  79.     txtptr=insdsk2
  80.     colour=1
  81.     gosub print3d
  82.  
  83.     gosub waitsgn
  84.     cmp class,$200000,2,goto chkclow
  85.     cmp code,$1b,0,goto remprta
  86. chkclow:cmp class,$200,0,goto remprta
  87.     skipdel=1
  88.  
  89. main:    txtptr=worktxt
  90.     gosub print3d
  91.     cmp skipdel,0,2,goto begit
  92.     delay(100)
  93.  
  94. begit:    blklen=winname-xcopy&$fffffe00
  95.     xboot=allocmem(blklen,2)
  96.     memmove(xboot,xcopy,blklen)
  97.     ret=trackdisk(drivenum,3,0,xboot,blklen)
  98.     ret=trackdisk(drivenum,4,0,0,0)
  99.     freemem(xboot,blklen)
  100.     validate(drivenum,0)    
  101.     pos=0
  102.     pointer=oritab
  103.  
  104. looper:    orig=^pointer
  105.     pointer=pointer+4
  106.     fix=^pointer
  107.     pointer=pointer+4
  108.     pval=^pointer
  109.     cmp pval,0,0,top=garbage
  110.     cmp pval,0,2,top=pval
  111.  
  112. * Scan file for our string and replace if found...
  113.     pos=fscan(drname,orig,fix-orig,fix,top-fix,pos)
  114.     cmp pos,-1,0,goto errpnf
  115.     cmp pos,-2,0,goto errfnf
  116.  
  117.     cmp pval,0,2,goto looper
  118.  
  119. itsok:    txtptr=prof
  120.     gosub print3d
  121.  
  122.     delay(100)
  123.     cmp note1,0,0,goto ky1
  124.     colour=3
  125.     txtptr=note1
  126.     gosub print3d
  127.     cmp note2,0,0,goto ky1
  128.     txtptr=note2
  129.     gosub print3d
  130.     cmp note3,0,0,goto ky1
  131.     txtptr=note3
  132.     gosub print3d
  133.  
  134. ky1:    cmp freturn,0,0,goto ky1a
  135.  
  136.     txtptr=clickany
  137.     gosub print3d
  138.     goto keyout
  139.  
  140. ky1a:    colour=1
  141.     yyval=yyval+10
  142.     txtptr=remdsk
  143.     gosub print3d
  144. ky2:    gosub remm
  145.     gosub waitsgn
  146.     cmp mess,0,0,goto ky2
  147.  
  148.     cmp numdsk,2,-1,goto bye0
  149.     yyval=yyval+10
  150.     txtptr=copyrst
  151.     gosub print3d
  152.     delay(50)
  153.  
  154. ky3:    curdsk=curdsk+1
  155.     cmp curdsk,numdsk,1,goto bye0
  156.     
  157.     tensv=curdsk/10&$ffff
  158.     onesv=tensv*10
  159.     onesv=curdsk-onesv
  160.     poke(dskm1,tensv+48)
  161.     poke(dskm1+1,onesv+48)
  162.  
  163.     tensv=numdsk/10&$ffff
  164.     onesv=tensv*10
  165.     onesv=numdsk-onesv
  166.     poke(dskm2,tensv+48)
  167.     poke(dskm2+1,onesv+48)
  168.  
  169.     docopy=simplereq(cpytitl,nxtdskm)
  170.     cmp docopy,1,-1,goto bye0
  171.     drivenum=fcopy(connect,-1)
  172.     cmp drivenum,0,-1,goto bye0
  173.     goto ky3
  174.  
  175. keyout:    gosub remm
  176.     gosub waitsgn
  177.     cmp mess,0,0,goto keyout
  178. bye0:    gosub closwin
  179. byebye:    end
  180.  
  181. errpnf:    cmp freturn,0,0,goto errp2
  182.  
  183.     txtptr=pnf1
  184.     gosub print3d
  185.     goto prii5a
  186.  
  187. errp2:    txtptr=pnf
  188.     gosub print3d
  189.     goto looper1
  190.  
  191. remprt:    delay(150)
  192.     cmp freturn,-1,0,goto bye0
  193. remprta:yyval=yyval+10
  194.     txtptr=remdsk
  195.     gosub print3d
  196.     goto keyout
  197.  
  198. errfnf:    cmp freturn,0,0,goto errf2
  199.  
  200.     txtptr=fnf1
  201.     gosub print3d
  202.     goto prii5a
  203.  
  204. errf2:    txtptr=fnf
  205.     gosub print3d
  206. looper1:pointer=oritab
  207. looper2:orig=^pointer
  208.     pointer=pointer+4
  209.     fix=^pointer
  210.     pointer=pointer+4
  211.     pval=^pointer
  212.     cmp pval,0,0,top=garbage
  213.     cmp pval,0,2,top=pval
  214.  
  215.     pos=dscan(drivenum,orig,fix-orig,fix,top-fix,0,1)
  216.     cmp pos,-2,0,goto prii5a
  217.     cmp pval,0,2,goto looper2
  218.     goto itsok
  219.  
  220. prii5a:    txtptr=pnf2
  221.     gosub print3d
  222.     goto remprt
  223.  
  224. #i "Params:WINHAND"
  225.